from utilities import *

from toee import *


def san_enter_combat( attachee, triggerer ):
	game.global_vars[708] = 0
	return RUN_DEFAULT


def san_start_combat( attachee, triggerer ):
	for pc in game.party:
		curr = pc.stat_level_get( stat_hp_current )
		if (curr <= -1 and curr >= -9 and pc.distance_to(attachee) <= 10 and game.global_vars[708] <= 3 ):
			game.global_vars[708] = game.global_vars[708] + 1
			create_item_in_inventory( 8905, attachee )
			return RUN_DEFAULT
	return RUN_DEFAULT


